package com.ymh.spring.annotation;

import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.ymh.spring.annotation.service.ManInterface;

public class FileSystemApplication {
	
	public static void main(String[] args) {
		/**
		 * 从（文件系统）下的一个或多个XML配置文件中加载上下文定义。
		 */
		FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext("c:/spring.xml");
		
		ManInterface man = (ManInterface) context.getBean("man");
		
		System.out.println(man.sayHello());
		
		context.close();
	}

	
}
